<?php session_start();
validaAcesso();
echo "<h2>Cadastro de ".$_SESSION["menu"]["cad"][1]."</h2>";

require_once"funcoes/com_tp_hospedaria.jsp";

if(isset($_GET[grava])==1){    
    setTpHospedaria(0,$_POST["pnome"]);
}
?>
<form method="POST" action="index.jsp?grava=1&cad=1" autocomplete="off">
<div class='item'><h5>Tipo de Hospedaria:</h5><input type="text" size="20" maxlength="20" name="pnome"> Ex: Hostel, Hotel, Pousada</div>
<br>
<div class='item'><h5>&nbsp;</h5><input type="submit" value="cadastrar"></div>

</form>

<?php
getTpHospedaria(0,"lista");
?>